package com.example.administrator.statemachine;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;

public class LoginActivity extends AppCompatActivity {

    private EditText userName;
    private EditText passWord;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        userName = (EditText) findViewById(R.id.editText);
        passWord = (EditText) findViewById(R.id.editText2);

    }

    public void btn(View view) {
        if (!TextUtils.isEmpty(userName.getText().toString().trim()) && !TextUtils.isEmpty(passWord.getText().toString().trim())) {
            //登陆成功 修改状态
            Cotorl.instance().setState(new Login());
            //查看是否上传上去

            finish();
        }
    }
}
